package com.richard.locationtest;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import java.util.HashMap;
import java.util.Map;

public class MainActivity extends AppCompatActivity {
    Map<Integer, Class> mTestItems = new HashMap<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        // 测试项目往这里加
        mTestItems.put(R.id.btn_native, NativeActivity.class);
        mTestItems.put(R.id.btn_baidu_location, BaiduLocationActivity.class);
        mTestItems.put(R.id.btn_baidu_map, BaiduMapActivity.class);
    }

    public void onClick(View view) {
        Class dst = mTestItems.get(view.getId());
        Intent intent = new Intent(this, dst);
        startActivity(intent);
    }
}
